package cn.stronglink.assetmanage.utils.dao;

import java.util.List;

import cn.stronglink.assetmanage.MyApplication;
import cn.stronglink.assetmanage.dao.DaoManager;
import cn.stronglink.assetmanage.dao.SearchAssetDao;
import cn.stronglink.assetmanage.entity.SearchAsset;

/**
 * Author by chencongcong,Date on 2018/10/9
 */
public class SearchDataUtil {
    public static SearchAsset getSearchAssetById_(String id_){
        if (id_==null||"".equals(id_)){
            return null;
        }
        List<SearchAsset> searchAssetList = DaoManager.getDaoSession(MyApplication.APP_CONTEXT).getSearchAssetDao().queryBuilder().
                where(SearchAssetDao.Properties.Id_.eq(id_)).list();
        if (searchAssetList!=null&&searchAssetList.size()>0){
            return searchAssetList.get(0);
        }
        return null;
    }
}
